<template>
    <div class="footer">
        <div @click="navigatorTo('index')">
            <font-awesome-icon :icon="['fas', 'house']" size="sm"/>
            <p>首页</p>
        </div>
        <div @click="navigatorTo('businessList')">
            <font-awesome-icon :icon="['fas', 'compass']" size="sm"/>
            <p>发现</p>
        </div>
        <div @click="navigatorTo('order')">
            <font-awesome-icon :icon="['fas', 'file-lines']" size="sm"/>
            <p>订单</p>
        </div>
        <div @click="navigatorTo('my')">
            <font-awesome-icon :icon="['fas', 'user']" size="sm"/>
            <p>我的</p>
        </div>
    </div>
</template>

<script setup lang="ts">

import {ref} from "vue"
import router from "../router";
const navigatorTo = (page)=>{
   router.replace({path:'/'+page})
}
</script>

<style scoped>
.footer{
    width: 100%;
    height: 14vw;
    border-top: solid 1px #DDD;
    background-color: #fff;

    position: fixed;
    left: 0;
    bottom: 0;

    display: flex;
    justify-content: space-around;
    align-items: center;
}
.footer div{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    color: #999;
    user-select: none;
    cursor: pointer;
}
.footer div p {
    font-size: 2.8vw;
    margin-top: 1.2vw;
    margin-bottom: 1.2vw;
}
font-awesome-icon{
    color: #bfc9d9;
}
</style>
